DX11 BUILD SHADOW MATRIX

Builds a translation matrix that flattens geometry into a plane, useful for creating shadow maps.

  Syntax
Return Dword = DX11 BUILD SHADOW MATRIX(vec4ShadowPlane, vec4LightPosition, [resultMatrix])
  Parameters
vec4ShadowPlane
Dword
A vector4 describing the shadow plane .
vec4LightPosition
Float
A vector4 describing the position of the light which produces said shadows. If the w component is 0, the light is handled as a directional light, if 1 it represents a point light.
[Optional] resultMatrix
Dword
The matrix to write the created translation matrix to. Can be omitted, in which case a temporary matrix holding the generated translation matrix will be returned.

  Returns

The resultMatrix, if one was provided, or a newly created temporary matrix holding the resulting matrix otherwise.

  See also

MATH Functions Menu
DX11 Function Categories